package com.eugene.entity;

import java.io.Serializable;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.eugene.element.FnCalendar;

public class VaR implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private final static Logger logger = LoggerFactory.getLogger(VcvMethod.class);	

	private String positionId;
	private FnCalendar	baseDate;
	
	private String varType;
	private String vcvMethodId;
	private double confidenceLevel;
	
	private String scenarioId;
	
	public String getScenarioId() {
		return scenarioId;
	}
	public void setScenarioId(String scenarioId) {
		this.scenarioId = scenarioId;
	}
	private String hierarchyId1;
	private String hierarchyId2;
	private String hierarchyId3;
	
	private double valueAtRisk;
	private double marginalVaR;
	private double contribuationVaR;
	private Date lastUpdate;
	
	public String getPositionId() {
		return positionId;
	}
	public void setPositionId(String positionId) {
		this.positionId = positionId;
	}
	public FnCalendar getBaseDate() {
		return baseDate;
	}
	public void setBaseDate(FnCalendar baseDate) {
		this.baseDate = baseDate;
	}
	public String getVarType() {
		return varType;
	}
	public void setVarType(String varType) {
		this.varType = varType;
	}
	
	public String getVcvMethodId() {
		return vcvMethodId;
	}
	public void setVcvMethodId(String vcvMethodId) {
		this.vcvMethodId = vcvMethodId;
	}
	public double getConfidenceLevel() {
		return confidenceLevel;
	}
	public void setConfidenceLevel(double confidenceLevel) {
		this.confidenceLevel = confidenceLevel;
	}
	
	public String getHierarchyId1() {
		return hierarchyId1;
	}
	public void setHierarchyId1(String hiearachyId1) {
		this.hierarchyId1 = hiearachyId1;
	}
	public String getHierarchyId2() {
		return hierarchyId2;
	}
	public void setHierarchyId2(String hiearachyId2) {
		this.hierarchyId2 = hiearachyId2;
	}
	public String getHierarchyId3() {
		return hierarchyId3;
	}
	public void setHierarchyId3(String hiearachyId3) {
		this.hierarchyId3 = hiearachyId3;
	}
	public double getValueAtRisk() {
		return valueAtRisk;
	}
	public void setValueAtRisk(double valueAtRisk) {
		this.valueAtRisk = valueAtRisk;
	}
	public double getMarginalVaR() {
		return marginalVaR;
	}
	public void setMarginalVaR(double marginalVaR) {
		this.marginalVaR = marginalVaR;
	}
	public double getContribuationVaR() {
		return contribuationVaR;
	}
	public void setContribuationVaR(double contribuationVaR) {
		this.contribuationVaR = contribuationVaR;
	}
	
	public Date getLastUpdate() {
		return lastUpdate;
	}
	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}
	//**********************************************************************
	public VaR(){
		
	}
	public VaR(FnCalendar baseDate, String positionId, String varType){
		this.baseDate = baseDate;
		this.positionId = positionId;
		this.varType =varType;
	}
	
	public VaR(FnCalendar baseDate, String positionId, String varType, String vcvMethodId, double confLevel,double valueAtRisk){
		this.baseDate = baseDate;
		this.positionId = positionId;
		this.varType = varType;
		this.vcvMethodId = vcvMethodId;
		this.confidenceLevel = confLevel;
		this.valueAtRisk = valueAtRisk;
		
	}
	public VaR(FnCalendar baseDate, VarmapId varmapId, String varType, String vcvMethodId, double confLevel,double valueAtRisk){
		this.baseDate = baseDate;
		this.scenarioId = varmapId.getScenarioId();
		this.positionId = varmapId.getPositionId();
		this.hierarchyId1 =varmapId.getHierarchyId1();
		this.varType = varType;
		this.vcvMethodId = vcvMethodId;
		this.confidenceLevel = confLevel;
		this.valueAtRisk = valueAtRisk;
		
	}
	public VaR(FnCalendar baseDate, String positionId, String varType, double valueAtRisk,double mgVaR, double conVaR){
		this.baseDate = baseDate;
		this.positionId = positionId;
		this.varType =varType;
		this.valueAtRisk = valueAtRisk;
		this.marginalVaR = mgVaR;
		this.contribuationVaR = conVaR;
	}
	
	
	@Override
	public boolean equals(Object other){
		return super.equals(other); 
	}
	@Override
	public int hashCode(){
		return super.hashCode();
	}
}
